﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Shapes;
using System.Windows.Media;
using System.Windows;

using TJDevHouse.Starcraft.Game;


namespace TJDevHouse.Starcraft.MapAnalyser.MapDrawing
{
	class StaticResourcesMapLayer : MapLayer
	{
		private Color NeutralColor = Colors.PaleTurquoise;

		protected override void RenderLayer(MapDisplay display)
		{
			SolidColorBrush brush = new SolidColorBrush(NeutralColor);
			foreach (StaticMapResource mineral in display.Map.StaticMinerals)
			{
				Path path = display.CreateElipsePath(brush, 2, 1);

				display.PositionElementByBuildTile(path, mineral.BuildTile);
				display.MapCanvas.Children.Add(path);
			}

			foreach (StaticMapResource geyser in display.Map.StaticVespeneGeysers)
			{
				Path path = display.CreateRectanglePath(brush, 4, 2);

				display.PositionElementByBuildTile(path, geyser.BuildTile);
				LayerCanvas.Children.Add(path);
			}
		}
	}
}
